//
//  TBRRegisterController.m
//  TBRentClient
//
//  Created by tonbright on 2018/5/4.
//  Copyright © 2018年 tonbright. All rights reserved.
//

#import "TBRRegisterController.h"
#import <JKCountDownButton.h>
@interface TBRRegisterController ()

@end

@implementation TBRRegisterController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (IBAction)checkCodeBtnClick:(JKCountDownButton *)sender {
    sender.enabled = NO;
    //button type要 设置成custom 否则会闪动
    [sender startCountDownWithSecond:10.0];
    [sender countDownChanging:^NSString *(JKCountDownButton *countDownButton, NSUInteger second) {
        NSString *title = [NSString stringWithFormat:@"剩余%ld秒",second];
        return title;
    }];
    [sender countDownFinished:^NSString *(JKCountDownButton *countDownButton, NSUInteger second) {
        countDownButton.enabled = YES;
        return @"点击重新获取";
    }];
}


@end
